package org.yaac.shared.file;

import java.io.Serializable;

/**
 * initialized by AutoBean framework
 * 
 * @author Max Zhu (thebbsky@gmail.com)
 *
 */
public interface FileDownloadPath {

	public enum Type {
		MEMCACHE, 
		BLOBSTORE_BLOB, 
		DATASTORE_BLOB,
		DATASTORE_TEXT
	}

	public Type getType();

	public void setType(Type type);

	/**
	 * blob key if it's a blobstore blob
	 * entity key if it's a datastore blob / text
	 * 
	 * @return
	 */
	public String getKeyStr();

	public void setKeyStr(String keyStr);

	/**
	 * @return fieldName will be null if it's a blobstore_blob
	 */
	public String getFieldName();

	public void setFieldName(String fieldName);
	
	/**
	 * @return index will not be null only when underlying field is a list
	 */
	public Integer getIndex();
	
	public void setIndex(Integer index);
	
	public String getFileName();
	
	public void setFileName(String fileName);
	
	public Integer getSize();
	
	public void setSize(Integer size);
}
